﻿<?xml version="1.0" encoding="utf-8" ?>
<objects
	xmlns="http://www.springframework.net"

  xmlns:d="http://www.springframework.net/database"
    >
  <object id="sessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate32">
    <property name="DbProvider" ref="DbProvider"/>
    <property name="MappingAssemblies">
      <list>
        <value>App.Service</value>
      </list>
    </property>
    <property name="HibernateProperties">
      <dictionary>
        <entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
        <entry key="dialect" value="NHibernate.Dialect.MsSql2008Dialect"/>
        <entry key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>

        <entry key="hibernate.cache.use_query_cache" value="true"/>
        <entry key="relativeExpiration" value="120"/>
        <entry key="hibernate.connection.isolation" value="ReadCommitted"/>
        <!--<entry key="hibernate.adonet.batch_size" value="25"/>-->
        <!--<entry key="hibernate.current_session_context_class"  value="thread_static"/>-->
        <entry key="hibernate.show_sql" value="true"/>
        <entry key="hibernate.format_sql" value="true"/>

      </dictionary>
    </property>
  </object>
  <object id="dbOperation" type="AppToolKit.Data.NHibernate.SpringDbAdapter,AppToolKit.Data.NHibernate" singleton="false">
    <property name="DbOperationTemplate" ref="adoTemplate"/>
    <property name="BuilderFactory" >
      <object type="AppToolKit.Data.CommandBuilderFactory,AppToolKit.Data"></object>
    </property>
  </object>
  <!--<object name="msgHandle" type="PMSServer.FormMessage,PMSServer">
      </object>-->
  <object id="adoTemplate" type="Spring.Data.Generic.AdoTemplate, Spring.Data">
    <property name="DbProvider" ref="DbProvider" />
  </object>
  <object name="databaseService" type="App.Service.DatabaseService,App.Service" singleton="false">
    <property name="DbOperation" ref="dbOperation"/>

  </object>
  <alias alias="dbProcessor" name="databaseService"/>
  <object name="genericeBusinessServerBuilder" type="AppToolKit.Core.Context.Spring.AutoConstruction.Builder.GenericeBusinessServerBuilder,AppToolKit.Core.Context.Spring"/>
  <object name ="custImplBusinessServerBuilder" type="AppToolKit.Core.Context.Spring.AutoConstruction.Builder.CustomImplBusinessServerBuilder,AppToolKit.Core.Context.Spring" />
  <object name ="serviceServerBuilder" type="AppToolKit.Core.Context.Spring.AutoConstruction.Builder.ServiceServerBuilder,AppToolKit.Core.Context.Spring" />
  <object name="businessManager" type="AppToolKit.Core.Context.Spring.AutoConstruction.BusinessManager,AppToolKit.Core.Context.Spring">
    <property name="Builderes">
      <list element-type="AppToolKit.Core.Context.Spring.AutoConstruction.IRemoteBusinessBuilder,AppToolKit.Core.Context.Spring">
        <ref object="genericeBusinessServerBuilder"/>
        <ref object="custImplBusinessServerBuilder"/>
        <ref object="serviceServerBuilder"/>
      </list>
    </property>
  </object>
  <!--<object name="saoBusinessManager" type="Spring.Remoting.SaoExporter,Spring.Services">
    <property name="TargetName" value="businessManager" />
    <property name="ServiceName" value="BusinessManager" />
  </object>-->

  <object name="autoConstructionTypeLocation" type="AppToolKit.Core.Context.Spring.AutoConstruction.AutoConstructionTypeLocation,AppToolKit.Core.Context.Spring" >
 
  </object>
  <object name="ContextAwareSlot" type="AppToolKit.Core.Context.Spring.ContextManager,AppToolKit.Core.Context.Spring" >
    <property name="ScopeManager" ref="ScopeMgr" />
    <property name="Builderes">
      <list element-type="AppToolKit.Core.Context.Spring.AutoConstruction.IBusinessBuilder,AppToolKit.Core.Context.Spring">
        <ref object="genericeBusinessServerBuilder"/>
        <ref object="custImplBusinessServerBuilder"/>
        <ref object="serviceServerBuilder"/>
      </list>
    </property>

  </object>
  <object name="ScopeMgr" type="AppToolKit.Core.Context.UniqueImplAttributeProcessor,AppToolKit.Core" />
  <object id="autoDector" type="AppToolKit.Core.AttributeDiscovery.AssemblyDetector,AppToolKit.Core">

    <property name="Processes">
      <list element-type="AppToolKit.Core.AttributeDiscovery.IFeatureProcessor,AppToolKit.Core">
        <ref object="autoConstructionTypeLocation"  />
        <ref object="ScopeMgr"/>
        <object  type="AppToolKit.Core.Context.Spring.ContextFixtureAttributeProcessor,AppToolKit.Core.Context.Spring"/>

        <object type="AppToolKit.Business.Observer.ObserveAttrProcessor,AppToolKit.Business">
          <property name="ContextMgr" ref="ContextAwareSlot"/>
          <property name="ObserveMgr" ref="observerManager" />
        </object>

      </list>
    </property>
  </object>
  <object id="observerManager" type="AppToolKit.Business.Observer.ObserverManager,AppToolKit.Business">
   
  </object>
  <!-- business base support-->
  <object name="metaCenter" type="AppToolKit.Model.EntityMetaCenter,AppToolKit.Model">
  </object>
  <object name="validationFactory" type="AppToolKit.Model.Validation.ValidationFactory,AppToolKit.Model">
    <property name="Database" ref="dbProcessor"/>
    <property name="MetaCenter" ref="metaCenter"/>
  </object>
  <object name="businessSupport" type="AppToolKit.Business.BusinessSupport,AppToolKit.Business">
    <property name="MetaCenter" ref="metaCenter"/>
    <property name="ValidationFactory" ref="validationFactory"/>
  </object>
  <object name="daoFactory" type="AppToolKit.Data.NHibernate.DataAccessObjectFactory,AppToolKit.Data.NHibernate" >
    <property name="Database" ref="dbProcessor"/>
    <property name="SessionFactory" ref="sessionFactory"/>
  </object>
  <object name="businessFactory" type="AppToolKit.Business.BusinessFactory,AppToolKit.Business" >
    <property name="Support" ref="businessSupport"/>
    <property name="DaoFactory" ref="daoFactory"/>
  </object>
  <object name="BlockBusinessDao.DAO" type="App.Service.BlockBusinessDao,App.Service" >
    <property name="NativeDatabase" ref="dbProcessor"/>
    <property name="SessionFactory" ref="sessionFactory"/>
  </object>
  <object name="BlockBusiness.Business" type="App.Service.BlockBusiness,App.Service" >
    <property name="Dao" ref="BlockBusinessDao.DAO"/>
    <property name="Support" ref="businessSupport"/>
  </object>
</objects>